﻿<UserControl x:Class="Beetle.Sl.EditorControl.Controls.DocImage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <Grid x:Name="LayoutRoot" Background="Wheat" >
        <Image x:Name="mainImage" Stretch="None"  />
        <Popup x:Name="popup" VerticalAlignment="Top" HorizontalAlignment="Left">
            <Grid VerticalAlignment="Top" HorizontalAlignment="Left" Width="{Binding ElementName=frameEllipse, Path=Width}" Height="{Binding ElementName=frameEllipse, Path=Height}" >
                <Image Stretch="Fill" Source="{Binding  ElementName=mainImage, Path=Source}" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Image>
                <Rectangle Width="8" Height="8" Fill="Red" VerticalAlignment="Top" HorizontalAlignment="Right" />
                <Rectangle Width="8" Height="8" Fill="Red" VerticalAlignment="Top" HorizontalAlignment="Left" />
                <Rectangle Width="8" Height="8" Fill="Red" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
                <Rectangle Width="8" Height="8" Fill="Red" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
                <Rectangle x:Name="frameEllipse" Stroke="Red" Visibility="Collapsed" StrokeDashArray="3 1 1" StrokeThickness="1" VerticalAlignment="Top" HorizontalAlignment="Left"></Rectangle>
            </Grid>
        </Popup>
        <Rectangle x:Name="dragEllipse" Width="8" Height="8"  Fill="Red" VerticalAlignment="Bottom" Visibility="Collapsed" HorizontalAlignment="Right" Cursor="Hand"/>
    </Grid>
</UserControl>
